#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int Cap(int n, int k)
{
	if (k != 0)
		return n * Cap(n, k - 1);
	else
		return 1;
}

int main()
{
	int n = 0;
	int k = 0;
	scanf("%d %d", &n, &k);
	printf("%d", Cap(n, k));
	return 0;
}